﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="PWManager.AccountScreen"
	x:Name="UserControl"
	d:DesignWidth="800" d:DesignHeight="600">

	<Grid x:Name="LayoutRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition/>
			<ColumnDefinition/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="65"/>
			<RowDefinition/>
			<RowDefinition Height="80"/>

		</Grid.RowDefinitions>
        <Grid.Resources>
            <DataTemplate x:Key="Accounts">
                <TextBlock Text="{Binding Name}" FontSize="21.333" Height="50" HorizontalAlignment="Left" VerticalAlignment="Center"/>                
            </DataTemplate>
        </Grid.Resources>
		<ScrollViewer Grid.Column="0" Margin="10,10,0,0" Grid.Row="1" HorizontalAlignment="Left" Height="360" VerticalAlignment="Top" Width="380">
			<ScrollViewer.ContextMenu>
                <ContextMenu StaysOpen="True" Name="AccountContextMenu" Loaded="MenuItem_Loaded">
                    <MenuItem Header="New Account"  Click="MenuItem_Click"/>
                    <MenuItem Header="Update Account" Click="MenuItem_Click"/>
                    <MenuItem Header="Delete Account" Click="MenuItem_Click"/>					
				</ContextMenu>
			</ScrollViewer.ContextMenu>
            <ListBox Name="AccountListBox" ItemsSource="{Binding}" ItemTemplate="{StaticResource Accounts}"  SelectionChanged="AccountListBox_SelectionChanged"/>
        </ScrollViewer>
		<Label Content="Accounts" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" Margin="10" VerticalAlignment="Top" FontSize="21.333"/>
		<Label Content="Account Details" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" Margin="10" VerticalAlignment="Top" FontSize="21.333"/>
		<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal">
            <Button x:Name="UpdateBtn" Content="Update User" HorizontalAlignment="Left" Margin="10" Style="{DynamicResource ButtonStyle}" VerticalAlignment="Center" Click="UpdateBtn_Click" />
            <Button x:Name="SignOutBtn" Content="Sign Out" HorizontalAlignment="Right" Margin="10" Style="{DynamicResource ButtonStyle}" VerticalAlignment="Center"  Click="SignOUtBtn_Click"/>
		</StackPanel>
		<ScrollViewer Grid.Column="1" HorizontalAlignment="Left" Height="Auto" Margin="10,10,0,0" Grid.Row="1" VerticalAlignment="Top" Width="380">
		<Grid Width="380" Height="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="50"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="50"/>
				<RowDefinition Height="75"/>
				<RowDefinition Height="50"/>
				<RowDefinition Height="75"/>
				<RowDefinition Height="50"/>
				<RowDefinition Height="75"/>
				<RowDefinition Height="50"/>
				<RowDefinition Height="75"/>
				<RowDefinition Height="50"/>
				<RowDefinition Height="75"/>
				<RowDefinition Height="50"/>
				<RowDefinition Height="40"/>				
			</Grid.RowDefinitions>
			<Label Grid.ColumnSpan="2" Height="30" Content="Account Name:" HorizontalAlignment="Left" Margin="10" Grid.Row="0" VerticalAlignment="Center" FontSize="14" FontFamily="Times New Roman"/>
                <TextBox x:Name="AccountNameTextBox" Height="30"  Padding="2" IsReadOnly="True" Width="300" Grid.Column="1" HorizontalAlignment="Left" Margin="0,10,10,10" Grid.Row="1" TextWrapping="NoWrap" VerticalAlignment="Center" FontSize="14"/>

			<Label Grid.ColumnSpan="2" Height="30" Grid.Row="2" Content="Account Username:" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Center" FontSize="14" FontFamily="Times New Roman"/>
                <TextBox x:Name="AccountUsernameTextBox" Height="30" Padding="2" IsReadOnly="True" Width="300" Grid.Row="3" Grid.Column="1"  HorizontalAlignment="Left" Margin="0,10,10,10"  TextWrapping="NoWrap" VerticalAlignment="Center" FontSize="14"/>

			<Label Grid.ColumnSpan="2" Height="30" Grid.Row="4" Content="Account Password:" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Center" FontSize="14" FontFamily="Times New Roman"/>
                <TextBox x:Name="AccountPasswordTextBox" Height="30" Padding="2" IsReadOnly="True" Width="300" Grid.Row="5" Grid.Column="1"  HorizontalAlignment="Left" Margin="0,10,10,10"  TextWrapping="NoWrap" VerticalAlignment="Center" FontSize="14"/>

			<Label Grid.ColumnSpan="2" Height="30" Grid.Row="6" Content="Account URL:" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Center" FontSize="14" FontFamily="Times New Roman"/>
                <TextBox x:Name="AccountLinkTextBox" Height="Auto" Padding="2" IsReadOnly="True" Width="300" Grid.Row="7" Grid.Column="1"  HorizontalAlignment="Left" Margin="0,10,10,10"  TextWrapping="Wrap" VerticalAlignment="Center" FontSize="14"/>

			<Label Grid.ColumnSpan="2" Height="30" Grid.Row="8" Content="Comments:" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Center" FontSize="14" FontFamily="Times New Roman"/>
                <TextBox x:Name="AccountCommentsTextBox" Height="Auto" Padding="2" IsReadOnly="True" Width="300" Grid.Row="9" Grid.RowSpan="3" Grid.Column="1"  HorizontalAlignment="Left" Margin="0,10,10,10"  TextWrapping="Wrap" VerticalAlignment="Top" FontSize="14"/>			
		</Grid>
		</ScrollViewer>
    </Grid>
</UserControl>